package com.geekchique.runningbuddy.controller;

import java.util.LinkedList;

import android.app.Activity;
import android.database.Cursor;
import android.widget.Button;
import android.widget.TextView;

import com.geekchique.runningbuddy.model.Jog;
import com.geekchique.runningbuddy.util.DBHelperImpl;
import com.geekchique.runningbuddy.util.IDBHelper;
import com.geekchique.runningbuddy.view.JogEntryView;
import com.geekchique.runningbuddy.view.TodayView;

public class DayOfJogDetailsControllerImpl implements IDayOfJogDetailsController{

	@SuppressWarnings("unused")
	private TodayView todayView;
	@SuppressWarnings("unused")
	private JogEntryView jogEntryView;
	private IDBHelper dbHelper;
	
	public DayOfJogDetailsControllerImpl(){
	}
	
	public DayOfJogDetailsControllerImpl(Activity today){
        this.dbHelper = new DBHelperImpl(today);		
	}

	public void createTodayView(Activity today, Button goToPastJogs, TextView miles, TextView jogName_heading, TextView timeRun) {
		this.todayView = new TodayView(today, goToPastJogs, miles, jogName_heading, timeRun);
	}
	
	public void createLastJogEntryView(Activity today, TextView miles, TextView jogName_heading, TextView timeRun) {
		this.jogEntryView = new JogEntryView(today,  miles, jogName_heading, timeRun);
	}

	public void populateTodaysJoggingEntries() {
		
	}
	
	public LinkedList<Jog> getDayOfJogs(Integer day, Integer month, Integer year) {
		return (LinkedList<Jog>) dbHelper.fetchAllJogEntries(day, month, year);
	}

	public LinkedList<Jog> getTodaysJogs() {
		return  (LinkedList<Jog>) dbHelper.fetchAllTodaysJogEntries();
	}
	
	public Cursor getCursorOfAllJogs() {
		return dbHelper.getCursorOfAllJogs();
	}
	
	public void setDBHelper(IDBHelper dbHelper){
		this.dbHelper = dbHelper;
	}

	public void populateTodaysJoggingTotals() {
		// TODO Auto-generated method stub
	}

}
